home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / util307.arc / ANSIKEYS.DOC < prev    next >
Text File  |  1987-03-04  |  6KB  |  148 lines

  1.  
  2.           ANSI&2K.SYS and Function Key Assignments
  3.  
  4.                 Bob Ketcham
  5.  
  6. About ANSI.SYS
  7.  
  8.      One of the more powerful features of DOS 2.0 is the Extended Screen and
  9. Keyboard Control provided by the ANSI.SYS device driver.  Using ANSI.SYS you
  10. can reassign the meaning of any key on the keyboard.
  11.  
  12.  
  13. A Bigger ANSI.SYS
  14.  
  15.      The power of ANSI.SYS is limited by the size of the buffer used to store
  16. keyboard reassignments.  The original buffer size is approximately 200 bytes.
  17. ANSI&2K.SYS is a revised version of ANSI.SYS.  The keyboard reassignment
  18. buffer has been enlarged by 2K (2048 BYTES).
  19.  
  20.  
  21. Installing ANSI&2K.SYS: The CONFIG.SYS File
  22.  
  23.      As stated above, ANSI&2K.SYS is an installable device driver.
  24. Installation of a device driver requires the use of a file called CONFIG.SYS.
  25. The CONFIG.SYS file's function is similar to that of the AUTOEXEC.BAT file.
  26. Like AUTOEXEC.BAT, the system looks for the CONFIG.SYS file on the disk with
  27. which the system is booted (started).  In a manner similar to the way the
  28. system looks for and runs programs listed in the AUTOEXEC.BAT file, the
  29. system looks for and loads device drivers listed in the CONFIG.SYS file.  A
  30. sample CONFIG.SYS file is provided with ANSI&2K.SYS.  It should be copied
  31. (along with ANSI&2K.SYS) to the disk you use to start your system.  When the
  32. machine is reset, ANSI&2K.SYS will be loaded as a device driver.  Note if the
  33. file CONFIG.SYS is not found with this documentation, use an editor to create
  34. a file called CONFIG.SYS containing the line "DEVICE = ANSI&2K.SYS"
  35.  
  36.  
  37. Keyboard Reassignment Using The TYPE Command
  38.  
  39.      The documentation for this feature of DOS 2.0 is found in Chapter 13 of
  40. the DOS manual.  It states "The control sequences defined below are valid
  41. only when issued through DOS function calls 1, 2, 6, and 9, ...".  Simple,
  42. any novice knows what a DOS function call is.  Well, its simpler than that.
  43. Any file which is displayed on the screen using the TYPE command is passed
  44. through one of the required function calls.  A sample file, KEYS is provided
  45. along with this documentation file.  After ANSI&2K.SYS is installed, the DOS
  46. command TYPE KEYS will assign a set of frequently used DOS commands to the
  47. forty combinations of function keys F1-F10, Shift, Ctrl, and Alt.
  48.  
  49.  
  50. Assigning and Displaying Function Key Assignments with KEYS
  51.  
  52.      The file KEYS consists of two primary sections.  The first section
  53. contains the escape control sequences which are used by ANSI&2K.SYS to do the
  54. keyboard reassignments.  When the TYPE command is used to display the file,
  55. this section will be invisible. (The screen will clear and the flicker of the
  56. cursor may be seen, but nothing more.)
  57.  
  58.      The second section displays the key assignment information to the user.
  59. Note that while cryptic commands may be assigned to the function keys, an
  60. english language translation may be displayed here.
  61.  
  62.  
  63. Modifying KEYS - Your Own Custom Keyboard
  64.  
  65.      An editor is required to modify KEYS.  Three which can be used are
  66. EDLIN, FRED, or VEdit.    Each has its advantages and disadvantages in this
  67. application.
  68.  
  69.      EDLIN is the DOS line editor provided with your copy of DOS.  That is
  70. its advantage.    If you use it, you will know its disadvantages.
  71.  
  72.      FRED is the FRee EDitor distributed using the Freeware concept.  In
  73. addition to the advantage of being free, it is friendly, easy to use, and
  74. fast.  It shares two disadvantages with EDLIN; it cannot be used to place the
  75. escape character (BASIC CHR$(27)) in a file, and it always places a carriage
  76. return and line feed at the end of the file.  (KEYS will scroll the top line
  77. off the screen if there is a CR-LF at its end.)  Note: although the Escape
  78. character cannot be inserted into a file with EDLIN or FRED; if it is already
  79. there (as it is in KEYS), the editors's copy functions may be used to move
  80. and duplicate it.
  81.  
  82.      VEdit is a powerful commercial editor, which can insert the Escape
  83. character into text.  It will allow you to leave the CR-LF sequence off the
  84. end of the last line if desired.  Additionally it is smaller than FRED, so it
  85. is convenient to place on most disks.  However,  many of its command syntaxes
  86. are cryptic.  I would not recommend it to the novice.
  87.  
  88.  
  89. What's in KEYS - the ESCape Control Sequences
  90.  
  91.      KEYS contains ESCape control sequences similar to the examples on page
  92. 13-11 of the DOS manual.  Sequences are provided for the forty combinations
  93. of function keys F1-F10, Shift, Ctrl, and Alt.
  94.  
  95.      Each sequence begins with the escape character.  In the DOS manual this
  96. is shown as "ESC".  Other representaions are:
  97.         - BASIC - CHR$(27)
  98.         - FRED - an arrow pointing left
  99.         - VEdit - ^[ (one character)
  100.         - Hexidecimal - 1B
  101.         - Decimal - 27
  102.         - Keyboard - Esc.
  103.  
  104.      Following the ESCape character is the left square bracket ([).  Each
  105. control sequence for keyboard reassignment ends with a lower case p.  Between
  106. [ and p are characters which identify the key to be reassigned and the
  107. reassignment to be made.  For example the F1 key is assigned the string "Dir
  108. /p" followed by a carriage return.  The control sequence to do this is:
  109.  
  110.         ESC[0;59;"Dir /p";13p
  111.  
  112. where:        represents:
  113.  
  114. 0;59;        the F1 key.  It sends the system two characters when struck;
  115.         A NUL (0) followed by decimal 59.
  116.  
  117. "Dir /p";       obviously the string "Dir /p".
  118.  
  119. 13        carriage return (decimal 13)
  120.  
  121. Notice the use of the semicolon as a delimiter.
  122.  
  123.  
  124. Getting Back to Normal - NULLKEYS
  125.  
  126.     Another file of keyboard reassignment control sequences is provided.  The
  127. command TYPE NULLKEYS will return the forty function combinations to their
  128. normal state.
  129.  
  130.  
  131. Suggested Use
  132.  
  133.      When used with a set of batch files, KEYS, ANSI&2K.SYS, and CONFIG.SYS
  134. can provide an excellent Main Menu on a hard disk system.
  135.  
  136.  
  137. Additional References:
  138.  
  139. DOS 2.0 Manual, Chapter 13
  140.  
  141. PC, Volume 2 Number 1, June 1983, page 423
  142.  
  143. Softalk, August 1983, page 6
  144.  
  145. PC, Volume 2 Number 6, November 1983, page 559
  146.  
  147.  
  148.